Trò chơi đua xe động vật trong UNITY Engine
114.739 lượt xem;
- InterpolationSwingIn.cs
- Interpolations /
- Bapk /
- Scripts /
- Assets /
- project /
1 using UnityEngine;
2 using System.Collections;
3
4 public class InterpolationSwingIn : InterpolationProcess
5 {
6 private float scale;
7
8 public InterpolationSwingIn(float scale)
9 {
10 this.scale = scale;
11 }
12
13 public override float apply(float a)
14 {
15 return a * a * ((scale + 1) * a - scale);
16 }
17
18 }
2 using System.Collections;
3
4 public class InterpolationSwingIn : InterpolationProcess
5 {
6 private float scale;
7
8 public InterpolationSwingIn(float scale)
9 {
10 this.scale = scale;
11 }
12
13 public override float apply(float a)
14 {
15 return a * a * ((scale + 1) * a - scale);
16 }
17
18 }